package com.zeltov.eo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.zeltov.bo.Car;
import com.zeltov.bo.Comment;

@Entity
@Table(name = "COMMENT")
public class CommentEO extends AbstractDomainEO implements Comment {

    private Long id;
    private String comment;
    private Car car;
    private Date commentDate;
    private String firstName;
    private String lastName;
    private String emailAddress;
    private String telephone;

    public CommentEO() {
    }

    @Override
	@Id
	@Column(name = "COMMENT_ID")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public final Long getId() {
        return id;
    }

    @Override
	public void setId(Long id) {
        this.id = id;
    }

    @Override
	public String getComment() {
        return comment;
    }

    @Override
	public void setComment(String comment) {
        this.comment = comment;
    }

    @Override
	@ManyToOne(targetEntity = CarEO.class)
    public Car getCar() {
        return car;
    }

    @Override
	public void setCar(Car car) {
        this.car = car;
    }

    @Override
	@Temporal(value = TemporalType.DATE)
    public Date getCommentDate() {
        return commentDate;
    }

    @Override
	public void setCommentDate(Date commentDate) {
        this.commentDate = commentDate;
    }

    @Override
	public String getFirstName() {
        return firstName;
    }

    @Override
	public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    @Override
	public String getLastName() {
        return lastName;
    }

    @Override
	public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    @Override
	public String getEmailAddress() {
        return emailAddress;
    }

    @Override
	public void setEmailAddress(String emailAddress) {
        this.emailAddress = emailAddress;
    }

    @Override
	public String getTelephone() {
        return telephone;
    }

    @Override
	public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

  
}
